<?php

class Application_Model_DbTable_Karta extends Zend_Db_Table_Abstract {

    protected $_name = 'karta';
    protected $_primary = 'KAR_id';
    protected $_referenceMap = array(
        'User' => array(
            'columns' => array('USE_id'),
            'refTableClass' => 'Application_Model_DbTable_User',
            'refColumns' => array('USE_id')
        )
    );

    public function getZajecie($idUser) {
        $rows = $this->fetchRow("USE_id = '$idUser'");
        return $rows->toArray();
    }

}